package mmc.action;

import static org.lwjgl.input.Keyboard.KEY_DOWN;
import mmc.Client;
import mmc.Player;
import mmc.networking.ViewDistanceChanged;


public class LowerViewRange extends InterfaceAction {

	public LowerViewRange() {
		super("LowerViewRange", (String)null, KEY_DOWN);
	}

	@Override
	public void performOnClient() {
		Player player = Client.client.getScene().player;
		player.viewDistance/=1.2;
		
		Client.client.getScene().getContext().post(new ViewDistanceChanged(player.viewDistance));
		player.whisper("viewDistance changed to "+player.viewDistance, player.getName());
	}

}
